package edu.tsinghua.mrpvc.device;
/**
 * 
 * @author 	
 * 			
 * last updated on 2009-11-20 by Tangjian
 *
 */
public interface TvDevice extends BasicDevice {
	public int powerOn();
	public int powerOff();
	public int sleep();
	public int wakeup();
	public int upVolume();
	public int downVolume();
	public int upChannel();
	public int downChannel();
	public int play(String url,int appType);
	public int pause();
	public int resume();
	public int openShareFolder(String path);
	
	//
	public int zoomOut();
	public int zoomIn();
	public int next();
	public int prev();
	public int rotate();
	
	//
	public int stateSave();
	public int stateRestore(float time,int volume);
	
	public final static String EVENT_TOPIC_STATE = "863pvc/Device/TvDevice/State";
	public final static String EVENT_TOPIC_ISVALID = "863pvc/Device/TvDevice/Ctrl/IsValid";
	public final static String EVENT_TOPIC_CTRL = "863pvc/Device/TvDevice/Ctrl/Tv";
	public final static String EVENT_TOPIC_CTRL_MOUSE = "863pvc/Device/TvDevice/CtrlMouse";
	public final static String EVENT_TOPIC_CTRL_KEY_BOARD = "863pvc/Device/TvDevice/CtrlKeyBoard";
	
	public final static String EVENT_PROPER_ID = "ID";
	public final static String EVENT_PROPER_POWER_STATE = "PowerState";
	public final static String EVENT_PROPER_CHANNEL = "Channel";
	public final static String EVENT_PROPER_VOLUME = "Volume";
	public final static String EVENT_PROPER_PLAY_STATE = "PlayState";
	public final static String EVENT_PROPER_PLAY_TIME = "PlayTime";
	
	public final static String EVENT_PROPER_ACTION = "Action";
	public final static String EVENT_PROPER_URL		= "url";
	public final static String EVENT_PROPER_LOCATION_X = "LocationX";
	public final static String EVENT_PROPER_LOCATION_Y = "LocationY";
	public final static String EVENT_PROPER_KEY = "Key";
	public static final String EVENT_PROPER_APPTYPE = "appType";
	
	public interface Constants{
		public static final String POWER_OFF 				= "0";
		public static final String POWER_ON 				= "1";
		
		public static final String ISVALID_TRUE				= "true";
		public static final String ISVALID_FALSE			= "false";
		
		public static final String STATE_PLAY			= "play";
		public static final String STATE_PAUSE		    = "pause";
		public static final String STATE_SLEEP			= "sleep";
		
		//for app 
		public static final String MIGRATION_MEDIA_APP  = "0";
		public static final String PICTURE_BROWSE_APP   = "1";
		public static final String GENERAL_MEDIA_APP    = "2";
		
		//for event ctrl_mouse
		public static final String MOUSE_LCLICK			= "lclick";
		public static final String MOUSE_RCLICK			= "rclick";
		public static final String MOUSE_ROLLUP			= "rollup";
		public static final String MOUSE_ROLLDOWN		= "rolldown";
		
		//for event ctrl_keyBoard
		public static final String KEY_UP				= "up";
		public static final String KEY_DOWN				= "down";
		public static final String KEY_LEFT				= "left";
		public static final String KEY_RIGHT			= "right";
		public static final String KEY_PLUS				= "+";
		public static final String KEY_MINUS			= "-";
		public static final String KEY_ENTER			= "enter";
		
		//for event ctrl
		public static final String ACTION_POWERON		= "powerOn";
		public static final String ACTION_POWEROFF		= "powerOff";
		public static final String ACTION_UPCHANNEL		= "upChannel";
		public static final String ACTION_DOWNCHANNEL   = "downChannel";
		public static final String ACTION_UPVOLUME		= "upVolume";
		public static final String ACTION_DOWNVOLUME	= "downVolume";
		public static final String ACTION_PLAY			= "play";
		public static final String ACTION_PAUSE		    = "pause";
		public static final String ACTION_SLEEP			= "sleep";
		public static final String ACTION_WAKEUP		= "wakeup";
		public static final String ACTION_RESUME        = "resume";
		public static final String ACTION_STATE_SAVE    = "stateSave";
		public static final String ACTION_STATE_RESTORE = "stateRestore";
		
	};
}
